package behavioralPattern.chain_of_responsibility.example02;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Client {
    public static void main(String[] args) throws ParseException {
        AuthController authController = new AuthController();

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        Date date = format.parse("2023-11-12");

        // 模拟审核申请及审批操作
        AuthInfo info = authController.doAuth("allwe", "989826", date);
        System.out.println(info.getInfo());

        // 审核
        AuthService.auth("1003","989826");

        // 2-
        AuthInfo info1 = authController.doAuth("allwe", "989826", date);
        System.out.println(info1.getInfo());
    }
}
